{% include 'head.html' %}


<body>
  <!-- 最为层容器 -->
  <div class="jd_container">
    <div class="jd_header" style="height: 50px;background: #dce2ec;width: 100%">
      <!--<span style="float: left;margin-left: -18%;margin-top: 15px;">货比三家</span>-->
      <a onclick="window.history.back();" >
        <div style="width: 10%;margin-left: -20%;">
        <span style="float: left;margin-top: 12px;font-size: 23px;color: #000;">
          <i class="fa fa-chevron-left">
          </i>
        </span>
        </div>
      </a>
      
      <div style="text-align:center;margin-top: 5%;float: left;width: 90%;">
        <span style="font-size: 19px;"><b>{{ title }}</b></span>
      </div>

      <a href="/flpg" >
        <div style="margin-right: -15%;float: right;margin-top: 12px;">
        <span style="font-size: 23px;color: #000;top:0;">
          <i class="fa fa-search">
          </i>
        </span>
      </div>
      </a>
    </div>


<script type="text/javascript">
      function go_query(){
        var inputdatas = $("#inputdata").val();
        //alert(inputdatas);
        if(inputdatas!=""){
          window.location.href="/queryData?keys="+inputdatas;
          $("#gotoQ").append('<img src="http://img.zcool.cn/community/01f0fb5ae9d1a6a801207fa1ba0ff1.gif">');
        }
      }





</script>


<a style="float: left;margin-top: -20px;margin-right: 20px;"></>

<script type="text/javascript" src="static/js/ydui.citys.js"></script>
<script type="text/javascript" src="static/js/ydui.js"></script>
<script type="text/javascript">
/**
 * 默认调用
 */
!function () {
  var $target = $('#J_Address');

  $target.citySelect();

  $target.on('click', function (event) {
    event.stopPropagation();
    $target.citySelect('open');
  });

  $target.on('done.ydui.cityselect', function (ret) {
    $(this).val(ret.provance + ' ' + ret.city + ' ' + ret.area);
  });
}();

</script>

<br>

<div id="top1" style="width: 1000px; overflow: hidden; height: 25px;background-color: #8d91aa;">
  <div class="content_bottom" >
    <ul class="seckul clearfix">
      <li class="seck_list1">
        <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=男装">
          <p>男装</p>
        </a>
              
      </li>
            <li class="seck_list1">
                <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=女装">
                  <p>女装</p>
                </a>
              
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=美装">
                  <p>美妆</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=手机">
                  <p>手机</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=电脑">
                  <p>电脑</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=华为">
                  <p>华为</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=Iphone">
                  <p>Iphone</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=童装">
                  <p>童装</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=玩具">
                  <p>玩具</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=家具">
                  <p>家具</p>
                </a>
            </li>


            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=CK">
                  <p>CK</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=裙子">
                  <p>裙子</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=香奈儿">
                  <p>香奈儿</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=迪奥">
                  <p>迪奥</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=香水">
                  <p>香水</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=口红">
                  <p>口红</p>
                </a>
            </li>
            <li class="seck_list1">
              <a class="btn btn-link" style="height: 30px;color: #fff;" href="/queryData?keys=口红">
                  <p>口红</p>
                </a>
            </li>
    </ul>
  </div>
</div>
      

<div id="gotoQ"></div>


<script type="text/javascript">

function codtemp(imglink_val,codlink_val,codname_val,price2_val,sales_val,pingtai_val,shopname_val,codid_val){
 var cod_temps = '<div class="show_div" style="background-color: #fff;height: 182px;margin-left: 5px;margin-right: 5px;">\
          <div class="row-fluid">\
            <div class="span4">\
              <img src="'+imglink_val+'" alt="" style="width: 120%;height: 120px;margin-top: 30px;">\
            </div>\
            <div class="span7" style="margin-left: 20px;margin-top: 10px;">\
              <!--Body content-->\
              <a href="/goto?urls='+codlink_val+'&names='+codname_val+'" class="btn btn-link" style="color: #272829;width: 110%;"><b><span class="title_span" style="margin-left: -5px;margin-bottom: 2px;">\
              '+codname_val+'</span></b></a><br>\
               <span style="font-size: 12px;color: #272829;">价格：</span><span style="font-size: 13px;color: #272829;">'+price2_val+'</span><br>\
                <span style="font-size: 12px;color: #272829;">销量：</span><span style="font-size: 11px;color: #272829;">'+sales_val+'</span><br>\
                 <span style="font-size: 9px;color: #272829;">店家：</span><span style="font-size: 9px;color: #272829;">'+shopname_val+'</span><br>\
                  <span style="font-size: 9px;color: #272829;">来源：</span><span style="font-size: 9px;color: #272829;">'+pingtai_val+'</span><br>\
                  <br>\
                  <div style="width: 110%;">\
                 <a class="btn btn-info" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="xqgo(this);" title="'+codid_val+'" >详情</a> \
                 <a class="btn btn-warning" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="scgo(this);" title="'+codid_val+'" >收藏</a>\
                  <a href="/goto?urls='+codlink_val+'&names='+codname_val+'" class="btn btn-success" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" title="Vest"\
            href="#" >商品链接</a> \
          </div>\
            </div>\
        </div>\
      </div>';
return  cod_temps;

}



function codtemp_zk(imglink_val,codlink_val,codname_val,price1_val,price2_val,sales_val,pingtai_val,shopname_val,codid_val){
 var cod_temps = '<div class="show_div" style="background-color: #fff;height: 182px;margin-left: 5px;margin-right: 5px;">\
          <div class="row-fluid">\
            <div class="span4">\
              <img src="'+imglink_val+'" alt="" style="width: 120%;height: 120px;margin-top: 30px;">\
            </div>\
            <div class="span7" style="margin-left: 20px;margin-top: 10px;">\
              <!--Body content-->\
              <a href="/goto?urls='+codlink_val+'&names='+codname_val+'" class="btn btn-link" style="color: #272829;width: 110%;"><b><span class="title_span" style="margin-left: -5px;margin-bottom: 2px;">\
              '+codname_val+'</span></b></a><br>\
              <span style="font-size: 13px;color: red;">折扣价：</span><span style="font-size: 13px;color: red;">'+price1_val+'</span><br>\
               <span style="font-size: 12px;color: #272829;">原价：</span><span style="font-size: 13px;color: #272829;">'+price2_val+'</span><br>\
                <span style="font-size: 12px;color: #272829;">销量：</span><span style="font-size: 11px;color: #272829;">'+sales_val+'</span><br>\
                 <span style="font-size: 9px;color: #272829;">店家：</span><span style="font-size: 9px;color: #272829;">'+shopname_val+'</span><br>\
                  <span style="font-size: 9px;color: #272829;">来源：</span><span style="font-size: 9px;color: #272829;">'+pingtai_val+'</span><br>\
                  <br>\
                  <div style="width: 110%;">\
                 <a class="btn btn-info" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="xqgo(this);" title="'+codid_val+'" >详情</a> \
                 <a class="btn btn-warning" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="scgo(this);" title="'+codid_val+'" >收藏</a>\
                  <a href="/goto?urls='+codlink_val+'&names='+codname_val+'" class="btn btn-success" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" title="Vest"\
            href="#" >商品链接</a> \
          </div>\
            </div>\
        </div>\
      </div>';
return  cod_temps;

}





function guanggao(){
  return '<br>\
        <div class="super_day" style="margin-bottom: 0px;">\
          <div class="super_img">\
            <a href="">\
              <img src="https://gtms04.alicdn.com/tps/i4/TB1aAIWHpXXXXahXpXXoeuYLVXX-1920-429.jpg" alt="" width="100%">\
            </a>\
          </div>\
        </div>'
}


function show_cod(datas){
    //alert(datas);
    //alert(typeof(datas));
    var jsondatas = JSON.parse(datas);
    //alert(jsondatas);
    //alert(typeof(jsondatas));
    for(datasinfo in jsondatas){
      //console.log(jsondatas[datasinfo]);
      var infos = jsondatas[datasinfo];
      console.log(infos);
      console.log(infos["img_link"]);
      //console.log(infos["names"]);
      //console.log(infos["link"]);
      
      //console.log(infos["price_1"]); 
      //console.log(infos["price_2"]); 
      //console.log(infos["sales"]); 
      //console.log(infos["pingtai"]); 
      //console.log(infos["shop_name"]); 

      
      $("#more").append(codtemp(infos[0],
                                infos[2],
                                infos[1],
                                infos[3],
                                infos[4],
                                infos[5],
                                infos[6],
                                infos[7]
                                ));
    }

    $("#more").append(guanggao());
    //getScrollTop_key = true;
  }


function show_zk(datas){
   var jsondatas = JSON.parse(datas);
    //alert(jsondatas);
    //alert(typeof(jsondatas));
    for(datasinfo in jsondatas){
      //console.log(jsondatas[datasinfo]);
      var infos = jsondatas[datasinfo];
      console.log(infos);
      console.log(infos["img_link"]);
      //console.log(infos["names"]);
      //console.log(infos["link"]);
      
      //console.log(infos["price_1"]); 
      //console.log(infos["price_2"]); 
      //console.log(infos["sales"]); 
      //console.log(infos["pingtai"]); 
      //console.log(infos["shop_name"]); 

      
      $("#more").append(codtemp_zk(infos[0],
                                infos[2],
                                infos[1],
                                infos[3],
                                infos[4],
                                infos[5],
                                infos[6],
                                infos[7],
                                infos[8]
                                ));
  }
}



var qnumber = 0;


//下拉接口判断
//判断是需要调用哪个接口
function next_cod(pgnum){
    //获取当前url 的 path
    var now_url = GetUrlRelativePath();
    //alert(now_url);
    var urls = ""

    //  /priorityZhekou  折扣活动推荐方式接口 
    if(now_url == "/priorityZhekou"){
      urls = "priorityZhekou?keys={{keysinfo}}&numb="+pgnum;
      console.log(urls);
      console.log(urls);
      get_api_ajax2(urls,show_zk);
    }
    else{

      // /queryeveryone 大家都在买接口
      if(now_url == "/queryeveryone"){
        //alert(now_url);
        //"/getcodeveryone"
        urls = "getcodeveryone?numb="+pgnum;
        console.log(urls);
      }
      // /queryeveryone 推荐你来买接口
      else if(now_url == "/tjnlm"){
        urls = "tjnlmdata?numb="+pgnum;
        console.log(urls);
      }

      //  /prioritySales  销量优先接口
      else if(now_url == "/prioritySales"){
        urls = "prioritySales?keys={{keysinfo}}&numb="+pgnum;
        console.log(urls);
      }

      //  /priorityPrice  价额优先接口
      else if(now_url == "/priorityPrice"){
        urls = "priorityPrice?keys={{keysinfo}}&numb="+pgnum;
        console.log(urls);
      }

      //  /priorityEveryone  大家都在买推荐方式接口 
      else if(now_url == "/priorityEveryone"){
        urls = "priorityEveryone?keys={{keysinfo}}&numb="+pgnum;
        console.log(urls);
      }

      

      //  /priorityTjnlm  推荐您来买推荐方式接口 
       else if(now_url == "/priorityTjnlm"){
        urls = "priorityTjnlm?keys={{keysinfo}}&numb="+pgnum;
        console.log(urls);
      }

      //  /queryDataPingtai  查询平台选择接口
       else if(now_url == "/queryDataPingtai"){
        urls = "queryDataPingtai?keys={{keysinfo}}&pingtai={{pttype}}&numb="+pgnum;
        console.log(urls);
      }

      //  /prioritySalesPingtai  销量优先平台选择接口
      else if(now_url == "/prioritySalesPingtai"){
        urls = "prioritySalesPingtai?keys={{keysinfo}}&pingtai={{pttype}}&numb="+pgnum;
        console.log(urls);
      }

      //  /priorityPricePingtai  价额优先平台选择接口
      else if(now_url == "/priorityPricePingtai"){
        urls = "priorityPricePingtai?keys={{keysinfo}}&pingtai={{pttype}}&numb="+pgnum;
        console.log(urls);
      }

      //  /everyonePingtai  大家都在买平台选择接口
      else if(now_url == "/everyonePingtai"){
        urls = "everyonePingtai?pingtai={{pttype}}&numb="+pgnum;
        console.log(urls);
      }

      //  /tjnlmPingtai  推荐您来买平台选择接口
      else if(now_url == "/tjnlmPingtai"){
        urls = "tjnlmPingtai?pingtai={{pttype}}&numb="+pgnum;
        console.log(urls);
      }

      // /getcoddata  查询接口
      else{
        urls = "getcoddata?keys={{keysinfo}}&numb="+pgnum;
        console.log(urls);
      }

      console.log(urls);
      get_api_ajax2(urls,show_cod);
  }
}



//获取当前url的path函数
function GetUrlRelativePath()
　　{
　　　　var url = document.location.toString();
　　　　var arrUrl = url.split("//");

　　　　var start = arrUrl[1].indexOf("/");
　　　　var relUrl = arrUrl[1].substring(start);//stop省略，截取从start开始到结尾的所有字符

　　　　if(relUrl.indexOf("?") != -1){
　　　　　　relUrl = relUrl.split("?")[0];
　　　　}
　　　　return relUrl;
　　}


  
  var top=$("#top1").offset().top;
  $(window).scroll(function () {
    if ($(window).scrollTop() >= 135) {
      $("#top1").attr("style", "overflow: hidden;position:fixed;top:50px;left:0;z-index:90;background:black;color:#000;background-color: #8d91aa;");
    } else {
       $("#top1").attr("style", "width: 100%; overflow: hidden; height: 30px;background-color: #8d91aa;");
    }
    //下拉刷新
    //console.log(getScrollTop());
    //console.log(getClientHeight());
    //console.log(getScrollHeight());
      if(getScrollTop() + getClientHeight() >= getScrollHeight()) {
          console.log('下拉刷新了');
          //此处发起AJAX请求
          //alert("下拉刷新了");

          qnumber+=1;

          next_cod(qnumber);
      }
  }).trigger("scroll");
</script>




    
   
      
      {% if cx %}
         

         <a class="btn btn-inverse" style="width: 60%;margin-left: 20%;margin-top: 8%;margin-bottom: 3%;" onclick="open_px();"> 选择排序方式 </a>
         <div id="px" class="show_but" style="width: 60%;height: 170px;background-color: #000;margin-left: 20%;position:absolute;z-index:999;margin-top:-3%;display: none;">
          <a href="/prioritySales?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">销量优先</a>
          <a href="/priorityPrice?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">价格优先</a>
          <a href="/priorityEveryone?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">大家都在买</a>
          <a href="/priorityZhekou?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">折扣|活动</a>
          <a href="/priorityTjnlm?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">推荐您来买</a>
        </div>

      {% endif %}

      {% if xz %}
        <a class="btn btn-link" href="/queryData?keys={{ keysinfo }}" style="width: 15%;" >默认</a>
        <a class="btn btn-inverse" style="width: 60%;margin-left: 4%;margin-top: 8%;margin-bottom: 3%;" onclick="open_px();"> {{ xz }} </a>
         <div id="px" class="show_but" style="width: 60%;height: 170px;background-color: #000;margin-left: 20%;position:absolute;z-index:999;margin-top:-3%;display: none;">
          <a href="/prioritySales?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">销量优先</a>
          <a href="/priorityPrice?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">价格优先</a>
          <a href="/priorityEveryone?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">大家都在买</a>
          <a href="/priorityZhekou?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">折扣|活动</a>
          <a href="/priorityTjnlm?keys={{ keysinfo }}" class="btn" style="width: 98%;margin-left: 1%;margin-top: 1%;">推荐您来买</a>
        </div>

      {% endif %}
    


    


    <script type="text/javascript">
      var pxkey = true;

      function open_px(){

        if(pxkey){
          $("#px").fadeIn("slow");
          pxkey = false;
        }
        else{
          $("#px").fadeOut("slow");
          pxkey = true;
          event.stopPropagation(); //阻止事件向上冒泡
        }
      }
    </script>

    {# 大家都在买 #}
    {% if everyone %}
    <div style="width: 100%;height: 5px;"></div>
      <div style="width: 100%;height: 38px;text-align: center;margin-top: 8%;">
        <!--<a href="/" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>-->
         {# 如果是选择只看淘宝则淘宝按钮变化 #}
        {% if tbtmshow %}
            <a href="/everyonePingtai?pingtai=tbtm" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% else %}
            <a href="/everyonePingtai?pingtai=tbtm" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% endif %}

        {% if jdshow %}
            <a href="/everyonePingtai?pingtai=jd" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% else %}
            <a href="/everyonePingtai?pingtai=jd" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% endif %}

        {% if snshow %}
            <a href="/everyonePingtai?pingtai=sn" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% else %}
            <a href="/everyonePingtai?pingtai=sn" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% endif %}

      </div>
    {% endif %}


    {# 推荐您来买 #}
    {% if tj %}
    <div style="width: 100%;height: 5px;"></div>
        <div style="width: 100%;height: 38px;text-align: center;margin-top: 8%;">
        <!--<a href="/" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>-->
        {# 如果是选择只看淘宝则淘宝按钮变化 #}
        {% if tbshow %}
            <a href="/tjnlmPingtai?pingtai=tb" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝</a>
        {% else %}
            <a href="/tjnlmPingtai?pingtai=tb" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝</a>
        {% endif %}

        {% if tmshow %}
            <a href="/tjnlmPingtai?pingtai=tm" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看天猫</a>
        {% else %}
            <a href="/tjnlmPingtai?pingtai=tm" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看天猫</a>
        {% endif %}

        {% if jdshow %}
            <a href="/tjnlmPingtai?pingtai=jd" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% else %}
            <a href="/tjnlmPingtai?pingtai=jd" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% endif %}

        {% if snshow %}
            <a href="/tjnlmPingtai?pingtai=sn" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% else %}
            <a href="/tjnlmPingtai?pingtai=sn" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% endif %}

      </div>
    {% endif %}



    {# *** 查询的平台选择按钮 *** #}
    {% if cx %}
      <div style="width: 100%;height: 38px;text-align: center;">

        {# 如果是选择只看淘宝则淘宝按钮变化 #}
        {% if tbtmshow %}
            <a href="/queryDataPingtai?keys={{ keysinfo }}&pingtai=tbtm" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% else %}
            <a href="/queryDataPingtai?keys={{ keysinfo }}&pingtai=tbtm" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% endif %}

        {# 如果是选择只看京东则京东按钮变化 #}
        {% if jdshow %}
            <a href="/queryDataPingtai?keys={{ keysinfo }}&pingtai=jd" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% else %}
            <a href="/queryDataPingtai?keys={{ keysinfo }}&pingtai=jd" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% endif %}

        {# 如果是选择只看苏宁则苏宁按钮变化 #}
        {% if snshow %}
            <a href="/queryDataPingtai?keys={{ keysinfo }}&pingtai=sn" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% else %}
            <a href="/queryDataPingtai?keys={{ keysinfo }}&pingtai=sn" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% endif %}


        <a onclick="webToast('拼多多的数据还在赶来的路上','middle',2000);" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看拼多多</a>

      </div>
    {% endif %}


    
    {# *** 销量优先的平台选择按钮 *** #}
    {% if xlyx %}
      <div style="width: 100%;height: 38px;text-align: center;">

        {# 如果是选择只看淘宝则淘宝按钮变化 #}
        {% if tbtmshow %}
            <a href="/prioritySalesPingtai?keys={{ keysinfo }}&pingtai=tbtm" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% else %}
            <a href="/prioritySalesPingtai?keys={{ keysinfo }}&pingtai=tbtm" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% endif %}

        {# 如果是选择只看京东则京东按钮变化 #}
        {% if jdshow %}
            <a href="/prioritySalesPingtai?keys={{ keysinfo }}&pingtai=jd" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% else %}
            <a href="/prioritySalesPingtai?keys={{ keysinfo }}&pingtai=jd" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% endif %}

        {# 如果是选择只看苏宁则苏宁按钮变化 #}
        {% if snshow %}
            <a href="/prioritySalesPingtai?keys={{ keysinfo }}&pingtai=sn" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% else %}
            <a href="/prioritySalesPingtai?keys={{ keysinfo }}&pingtai=sn" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% endif %}


        <a onclick="webToast('拼多多的数据还在赶来的路上','middle',2000);" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看拼多多</a>

      </div>
    {% endif %}



    {# *** 价格优先的平台选择按钮 *** #}
    {% if jgyx %}
      <div style="width: 100%;height: 38px;text-align: center;">

        {# 如果是选择只看淘宝则淘宝按钮变化 #}
        {% if tbtmshow %}
            <a href="/priorityPricePingtai?keys={{ keysinfo }}&pingtai=tbtm" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% else %}
            <a href="/priorityPricePingtai?keys={{ keysinfo }}&pingtai=tbtm" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看淘宝/天猫</a>
        {% endif %}

        {# 如果是选择只看京东则京东按钮变化 #}
        {% if jdshow %}
            <a href="/priorityPricePingtai?keys={{ keysinfo }}&pingtai=jd" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% else %}
            <a href="/priorityPricePingtai?keys={{ keysinfo }}&pingtai=jd" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看京东商城</a>
        {% endif %}

        {# 如果是选择只看苏宁则苏宁按钮变化 #}
        {% if snshow %}
            <a href="/priorityPricePingtai?keys={{ keysinfo }}&pingtai=sn" class="btn disabled btn-info" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% else %}
            <a href="/priorityPricePingtai?keys={{ keysinfo }}&pingtai=sn" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看苏宁易购</a>
        {% endif %}


        <a onclick="webToast('拼多多的数据还在赶来的路上','middle',2000);" class="btn disabled" style="font-size: 11px;width: 23%;padding: 5px 2px;">只看拼多多</a>

      </div>
    {% endif %}
    


    


    <!-- 京东内容区域 -->
    <div class="jd_mian" id="container">
      <div class="main_content" style="background-color: #edf4ff;">
        
        
        


      
          
      {% for data in datalist %}

      <div class="show_div" style="background-color: #fff;height: 182px;margin-left: 5px;margin-right: 5px;">
          
          {% if zhekoushow %}

               <div class="row-fluid">
            <div class="span4">
              <!--Sidebar content-->
              <img src="{{data[0]}}" alt="" style="width: 120%;height: 120px;margin-top: 30px;">
            </div>


            <div class="span7" style="margin-left: 20px;margin-top: 10px;">
              <!--Body content-->
              <a href="/goto?urls={{data[2]}}&names={{data[1]}}" class="btn btn-link" style="color: #272829;width: 110%;"><b><span class="title_span" style="margin-left: -5px;margin-bottom: 2px;">
              {{data[1]}}</span></b></a><br>
               <span style="font-size: 13px;color: red;">折扣价：</span><span style="font-size: 13px;color: red;">{{data[3]}}</span><br>
               <span style="font-size: 12px;color: #272829;">原价：</span><span style="font-size: 11px;color: #272829;">{{data[4]}}</span><br>
                <span style="font-size: 12px;color: #272829;">销量：</span><span style="font-size: 11px;color: #272829;">{{data[5]}}</span><br>
                 <span style="font-size: 9px;color: #272829;">店家：</span><span style="font-size: 9px;color: #272829;">{{data[7]}}</span><br>
                  <span style="font-size: 9px;color: #272829;">来源：</span><span style="font-size: 9px;color: #272829;">{{data[6]}}</span><br>
                  <br>
                  <div style="width: 110%;">
                 <a class="btn btn-info" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="xqgo(this);" title="{{ data[7] }}" >详情</a> 
                 <a class="btn btn-warning" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="scgo(this);" title="{{data[7]}}" >收藏</a>
                  <a href="{{data[2]}}" class="btn btn-success" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" title="Vest"
            href="#" >商品链接</a> 
          </div>
            </div>


        </div>



          {% else %}

          <div class="row-fluid">
            <div class="span4">
              <!--Sidebar content-->
              <img src="{{data[0]}}" alt="" style="width: 120%;height: 120px;margin-top: 30px;">
            </div>
            <div class="span7" style="margin-left: 20px;margin-top: 10px;">
              <!--Body content-->
              <a href="/goto?urls={{data[2]}}&names={{data[1]}}" class="btn btn-link" style="color: #272829;width: 110%;"><b><span class="title_span" style="margin-left: -5px;margin-bottom: 2px;">
              {{data[1]}}</span></b></a><br>
               <span style="font-size: 12px;color: #272829;">价格：</span><span style="font-size: 13px;color: #272829;">{{data[3]}}</span><br>
                <span style="font-size: 12px;color: #272829;">销量：</span><span style="font-size: 11px;color: #272829;">{{data[4]}}</span><br>
                 <span style="font-size: 9px;color: #272829;">店家：</span><span style="font-size: 9px;color: #272829;">{{data[6]}}</span><br>
                  <span style="font-size: 9px;color: #272829;">来源：</span><span style="font-size: 9px;color: #272829;">{{data[5]}}</span><br>
                  <br>
                  <div style="width: 110%;">
                 <a class="btn btn-info" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="xqgo(this);" title="{{ data[7] }}" >详情</a> 
                 <a class="btn btn-warning" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" onclick="scgo(this);" title="{{data[7]}}" >收藏</a>
                  <a href="{{data[2]}}" class="btn btn-success" style="padding: 0px;color: #fff;margin-top: -10px;width: 30%;font-size: 11px;" title="Vest"
            href="#" >商品链接</a> 
          </div>
            </div>
        </div>

        {% endif %}

      </div>
      {% endfor %}


      




          
        <br>
        <div class="super_day" style="margin-bottom: -15px;">
          <div class="super_img">
            <a href="">
              <img src="https://gtms04.alicdn.com/tps/i4/TB1aAIWHpXXXXahXpXXoeuYLVXX-1920-429.jpg" alt="" style="width: 100%;">
            </a>
          </div>


          
        </div>


          
        </div>
        





        <div id="more">
          

        </div>
        



      </div>
    </div>


    

  </div>



<div id="lodinggo">
    <img style="width: 100%;height: 150px;" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559654212283&di=a780121fd32955065b060b885c7dc0b9&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F03937de50fab17a88fcb6039242de0cf89657b472a98a-7EtXD9_fw658">
</div>

<script type="text/javascript">
    

    function scgo_show(datas){
      //alert(datas);

      if(datas == 0){
              //alert(datas);
              //alert("密码错误");
              webToast("请登陆后收藏！","middle",2000);

              
              setTimeout(function(){window.location.href="/my";},1000);
            }
            else if(datas == 1){
              webToast("收藏成功！","middle",2000);
            }
            else{
              //alert("环境异常");
              webToast("网络环境异常","middle",2000);
            }
    }

    function scgo(e){
      //alert(e.title);
      var linkdatas = {
          "links":e.title
                }
      post_api_ajax3(linkdatas,"collectCod",scgo_show);
    }

    //详情
    function xqgo(e){
      window.location.href="/codinfo?xqdatas="+e.title;
    }


</script>




{% include 'foot_sp.html' %}